Skip to content

feat/exclude_none=True for TypedDict encoder#96

Merged
blast-hardcheese merged 5 commits intomainfrom
dstewart/feat/exclude_none
Sep 30, 2024
Merged

feat/exclude_none=True for TypedDict encoder#96
blast-hardcheese merged 5 commits intomainfrom
dstewart/feat/exclude_none

Conversation

@blast-hardcheese
Copy link
Copy Markdown
Contributor

Why

I missed exclude_none=True semantics for TypedDict, so let's add that in there.

What changed

  • Add a structured oneOf test
  • Add a deep_equals method
  • Remove cast usage in parity
  • Add "exclude_none" functionality. This should make TypeDict exactly equal to pydantic for inputs.

Test plan

Tests included

@blast-hardcheese blast-hardcheese requested a review from a team as a code owner September 30, 2024 23:16
@blast-hardcheese blast-hardcheese requested review from jackyzha0 and ryantm and removed request for a team September 30, 2024 23:16
@blast-hardcheese
Copy link
Copy Markdown
Contributor Author

Ran tests:

$ bash scripts/parity.sh
Using /tmp/river-codegen-parity.xXU
Success: no issues found in 1 source file
Starting...
Verified
Cleaning up...

@blast-hardcheese blast-hardcheese added the enhancement New feature or request label Sep 30, 2024
@blast-hardcheese blast-hardcheese enabled auto-merge (squash) September 30, 2024 23:19
@blast-hardcheese blast-hardcheese merged commit 41647dc into main Sep 30, 2024
@blast-hardcheese blast-hardcheese deleted the dstewart/feat/exclude_none branch September 30, 2024 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants